package p270jp.pxv.android.topLevel.presentation;

import androidx.lifecycle.AbstractC0720j0;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import p023an.Intrinsics;
import p047bg.C1124a;
import p054bn.AbstractC1136i;
import p054bn.DebugMetadata;
import p060c2.Chain;
import p064c6.Preconditions;
import p189gn.AbstractC3450p;
import p325m0.MutabilityOwnership;
import p445qf.C5830a;
import p493sf.AbstractC6048h;
import p493sf.FluxUtils;
import p501sn.CoroutineScope;
import p551ul.TopLevelAction;
import p551ul.TopLevelEvent;
import p578vn.AbstractC6853b;
import p578vn.FlowCollector;
import p603wm.Unit;
import p681zm.Continuation;

/* compiled from: TopLevelStore.kt */
/* renamed from: jp.pxv.android.topLevel.presentation.TopLevelStore */
/* loaded from: classes2.dex */
public final class TopLevelStore extends AbstractC0720j0 {

    /* renamed from: c */
    public final MutableLiveData<C5830a<TopLevelEvent>> f19341c;

    /* renamed from: d */
    public final LiveData<C5830a<TopLevelEvent>> f19342d;

    /* compiled from: TopLevelStore.kt */
    @DebugMetadata(m10153c = "jp.pxv.android.topLevel.presentation.TopLevelStore$1", m10152f = "TopLevelStore.kt", m10151l = {47}, m10150m = "invokeSuspend")
    /* renamed from: jp.pxv.android.topLevel.presentation.TopLevelStore$a */
    /* loaded from: classes2.dex */
    public static final class C4329a extends AbstractC1136i implements AbstractC3450p<CoroutineScope, Continuation<? super Unit>, Object> {

        /* renamed from: a */
        public int f19343a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC6048h f19344b;

        /* renamed from: c */
        public final /* synthetic */ TopLevelStore f19345c;

        /* compiled from: Collect.kt */
        /* renamed from: jp.pxv.android.topLevel.presentation.TopLevelStore$a$a */
        /* loaded from: classes2.dex */
        public static final class C4330a implements FlowCollector<FluxUtils> {

            /* renamed from: a */
            public final /* synthetic */ TopLevelStore f19346a;

            public C4330a(TopLevelStore topLevelStore) {
                this.f19346a = topLevelStore;
            }

            @Override // p578vn.FlowCollector
            /* renamed from: a */
            public Object mo924a(FluxUtils aVar, Continuation<? super Unit> dVar) {
                FluxUtils aVar2 = aVar;
                if (MutabilityOwnership.m3749h(aVar2, TopLevelAction.C6650d.f28314a)) {
                    this.f19346a.f19341c.m11032n(new C5830a<>(TopLevelEvent.C6659e.f28328a));
                } else if (MutabilityOwnership.m3749h(aVar2, TopLevelAction.C6651e.f28315a)) {
                    this.f19346a.f19341c.m11032n(new C5830a<>(TopLevelEvent.C6657c.f28326a));
                } else if (MutabilityOwnership.m3749h(aVar2, TopLevelAction.C6649c.f28313a)) {
                    this.f19346a.f19341c.m11032n(new C5830a<>(TopLevelEvent.C6658d.f28327a));
                } else if (MutabilityOwnership.m3749h(aVar2, TopLevelAction.C6648b.f28312a)) {
                    this.f19346a.f19341c.m11032n(new C5830a<>(TopLevelEvent.C6656b.f28325a));
                } else if (MutabilityOwnership.m3749h(aVar2, TopLevelAction.C6647a.f28311a)) {
                    this.f19346a.f19341c.m11032n(new C5830a<>(TopLevelEvent.C6655a.f28324a));
                }
                return Unit.f29503a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4329a(AbstractC6048h hVar, TopLevelStore topLevelStore, Continuation<? super C4329a> dVar) {
            super(2, dVar);
            this.f19344b = hVar;
            this.f19345c = topLevelStore;
        }

        @Override // p054bn.ContinuationImpl
        public final Continuation<Unit> create(Object obj, Continuation<?> dVar) {
            return new C4329a(this.f19344b, this.f19345c, dVar);
        }

        @Override // p189gn.AbstractC3450p
        public Object invoke(CoroutineScope d0Var, Continuation<? super Unit> dVar) {
            return new C4329a(this.f19344b, this.f19345c, dVar).invokeSuspend(Unit.f29503a);
        }

        @Override // p054bn.ContinuationImpl
        public final Object invokeSuspend(Object obj) {
            Intrinsics aVar = Intrinsics.COROUTINE_SUSPENDED;
            int i = this.f19343a;
            if (i == 0) {
                Chain.m9951I(obj);
                AbstractC6853b<FluxUtils> a = this.f19344b.mo2434a();
                C4330a aVar2 = new C4330a(this.f19345c);
                this.f19343a = 1;
                if (a.mo1092c(aVar2, this) == aVar) {
                    return aVar;
                }
            } else if (i == 1) {
                Chain.m9951I(obj);
            } else {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            return Unit.f29503a;
        }
    }

    public TopLevelStore(AbstractC6048h hVar) {
        MutabilityOwnership.m3745m(hVar, "dispatcher");
        MutableLiveData<C5830a<TopLevelEvent>> xVar = new MutableLiveData<>();
        this.f19341c = xVar;
        this.f19342d = xVar;
        C1124a.m10167y(Preconditions.m9807K(this), null, 0, new C4329a(hVar, this, null), 3, null);
    }
}
